import React, { useContext } from 'react';
import contextObj from './context'
const Grandson1 = () => {
    const { state, dispatch } = useContext(contextObj)
    return (
        <div>
            <p onClick={() => {
                dispatch({ type: '+', payload: 20 })
            }}>孙子1 组件--{state.count}</p>
        </div>
    );
}

export default Grandson1;
